/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

:root {
  --primary-color: #6366f1; /* 主色调 */
  --secondary-color: #a5b4fc; /* 次要色调 */
  --accent-color: #4f46e5; /* 强调色 */
  --text-primary: #1f2937; /* 主文本色 */
  --text-secondary: #6b7280; /* 次要文本色 */
  --bg-primary: #ffffff; /* 主背景色 */
  --bg-secondary: #f9fafb; /* 次要背景色 */
  --border-color: #e5e7eb; /* 边框色 */
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
}

/* 布局类 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.items-center {
  align-items: center;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.p-2 {
  padding: 0.5rem;
}

.p-4 {
  padding: 1rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.m-2 {
  margin: 0.5rem;
}

.m-4 {
  margin: 1rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.my-2 {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.rounded {
  border-radius: 0.25rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-full {
  border-radius: 9999px;
}

/* 组件样式 */
.card {
  background-color: var(--bg-primary);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  padding: 1rem;
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--accent-color);
}

.btn-secondary {
  background-color: white;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--bg-secondary);
}

.input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  outline: none;
  transition: border-color 0.2s;
}

.input:focus {
  border-color: var(--primary-color);
}

/* 导航栏样式 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: var(--bg-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 0.25rem;
}

.nav-link.active {
  color: var(--primary-color);
  font-weight: 500;
}

/* 底部导航 */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: var(--bg-primary);
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
  position: fixed;
  bottom: 0;
  width: 100%;
  padding: 0.75rem 0;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.75rem;
}

.bottom-nav-item.active {
  color: var(--primary-color);
}

.bottom-nav-icon {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

/* 图书卡片样式 */
.book-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.book-card:hover {
  transform: translateY(-5px);
}

.book-cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}

.book-info {
  padding: 0.75rem;
}

.book-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-author {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* 播放器样式 */
.player {
  background-color: var(--bg-primary);
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.player-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.player-progress {
  width: 100%;
  height: 0.25rem;
  background-color: var(--bg-secondary);
  border-radius: 9999px;
  overflow: hidden;
}

.player-progress-bar {
  height: 100%;
  background-color: var(--primary-color);
  width: 30%; /* 演示用，实际应根据播放进度动态设置 */
}

/* 工具提示和标签 */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--secondary-color);
  color: white;
}

/* 响应式网格 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* 图标字体 */
.icon {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
} 